package restapi

import (
	"net/http"

	"github.com/gin-gonic/gin"
)

func OkResponse(c *gin.Context, data gin.H) {
	c.JSON(http.StatusOK, gin.H{
		"message": "ok",
		"data":    data,
	})
}

func FailResponse(c *gin.Context, err string, errCode int) {
	c.JSON(errCode, gin.H{
		"message": "fail",
		"error":   err,
	})
}
